package com.robosense.datacenter;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

@Slf4j
@SpringBootApplication
public class DatacenterApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(DatacenterApplication.class, args);
        ConfigurableEnvironment environment = context.getEnvironment();
        String port = environment.getProperty("server.port");
        String activeProfiles = environment.getActiveProfiles()[0];
        log.info("启动成功:{}====>{}",port,activeProfiles);
    }

}
